﻿using System;

namespace IOP.Protocols.MQTT.Package
{
    /// <summary>
    /// 
    /// </summary>
    public interface IMQTTPackage
    {
        /// <summary>
        /// 控制报文类型
        /// </summary>
        ControlPacketType PacketType { get; }

        /// <summary>
        /// 剩余长度
        /// </summary>
        uint RemainingLength { get; }

        /// <summary>
        /// 转换为字节数组
        /// </summary>
        /// <returns></returns>
        Span<byte> ToBytes();
    }
}
